MS Outlook Functions Library Objects
See Using the Microsoft Office Library.
Outlook Meeting Functions
In version 7.2, Add Recipient, Add Room, Find Time Slots and Schedule Meeting functions were added with Outlook Meeting. See Using Outlook Meeting Functions.
Function / Event |
Return Value |
Description |
Syntax |
Add Recipient |
Boolean |
Adds the recipient email address or name to the list of recipients (Recipients property). You must also specify whether the recipient is required or not. This function is executed on the business entity instance of the Outlook Meeting base type. |
Add Recipient of My Meeting <Select Email Address Or Name> <Select Is Required> |
Add Room |
Number |
Adds a room to the list of rooms (Rooms Pool property) and returns the number of rooms in the list. This function is executed on the business entity instance of the Outlook Meeting base type. |
Add Room of My Meeting <Select Name> |
Find Time Slots |
Number |
Identifies possible time slots (and rooms) for all mandatory recipients (taking into account the meeting duration, working days, and working hours). Obviously the more meetings that are already in the recipients' calendars, the fewer time slots will be available. The function returns the number of time slots available for all the mandatory recipients and populates the Time Slots property. This Time Slots property is a list of JSON objects, with each object in this list including a possible time slot and the list of available rooms for the time slot. This function is executed on the business entity instance of the Outlook Meeting base type. You can then extract the start time from the first time slot and extract a room for the time slot and use these as input parameters in the Schedule Meeting function. For an example, see Using Outlook Meeting Functions. By default, the Duration is set to 60 minutes, the Working Days are set to 0,1,2,3,4, the Working From is set to 09:00 and the Working Until is set to 18:00. If required, use the Set function to specify different values for these properties in the business entity instance of the Outlook Meeting base type. |
Find Time Slots from of My Meeting <Select From Time> <Select To Time> |
Get Mail Item Using Folder Hierarchy And Filter |
Outlook Mail Item |
Retrieves the first email item from the specified folder hierarchy based on the filter applied. The root of the hierarchy is the email ID. For example, to retrieve all the unread emails from the inbox, with email ID john.doe@nice.com. specify the folder hierarchy as: John.doe@nice.com Inbox Examples of filters: [Subject] = 'Chocolates at my Desk!' – Retrieves all emails with the specified subject line. [SenderEmailAddress] = nicensc@service-now.com – Retrieves all emails received from the specified email ID. |
Get Mail Item from <Folder Hierarchy> with filter <Filter> |
Get Outlook Folder Mail Items Using Folder Hierarchy And Passed Filter |
List of Outlook Mail Item |
Retrieves all the email items from a specified folder hierarchy, based on the filter applied. The root of the hierarchy is the email ID. For example, to retrieve all unread emails from the inbox, with email ID john.doe@nice.com, specify the folder hierarchy as: John.doe@nice.com Inbox Examples of filters: [Subject] = 'Chocolates at my Desk!' – Outlook will retrieve all the emails with the specified subject line. [SenderEmailAddress] = nicensc@service-now.com – Outlook will retrieve all the emails received from the specified email ID. |
Get All Mail Items from <Folder Hierarchy> and passed filter <Filter> |
Get Unread Mail Items Using Folder Hierarchy And Oldest Date Limit |
List of Outlook Mail Item |
Retrieves all the unread email items from a specified folder hierarchy, until a specified date. Root of the hierarchy is the email ID. For example, to retrieve all the unread emails from the inbox, and the email ID is john.doe@nice.com, specify the folder hierarchy as: John.doe@nice.com Inbox |
Get Unread Mail Items from <Folder Hierarchy> search items newer than <Date> |
Schedule Meeting |
None |
Schedules a meeting for the recipients at the Start Time in the Room with the message Body and Subject. By default, the Duration of the meeting is set to 60 minutes. If required, use the Set function to specify a different duration in the business entity instance of the Outlook Meeting base type. This function is executed on the business entity instance of the Outlook Meeting base type. You can use the Find Time Slots functions to create a list of available time slots (and rooms) when all mandatory recipients are available, and then use these values in a custom function to set the start time to the first available time slot and allocate a room accordingly. See Using Outlook Meeting Functions. |
Schedule Meeting of My Meeting <Select Room> <Select Start Time> <Select Subject> <Select Body> |
Unread Mail |
List of Outlook Mail Item |
Retrieves all the unread email items from the specified folder hierarchy, until a specified date. Root of the hierarchy is your email ID. For example, you want to retrieve all the unread emails from your inbox, and your email ID is john.doe@nice.com. In this case, you need to specify the folder hierarchy as: John.doe@nice.com Inbox |
Get All Unread Mail Items From <Folder Hierarchy> Until <Date> |
MS Outlook Functions

Asynchronously retrieves all email items from the specified Inbox folder and according to the Event Id returned from the Async Call Completed event (the event that is returned when there's a result for calling the function). To get emails that are in the Inbox and not in a folder, leave the Folder parameter empty.
Function Structure
Asynchronously <event id> Get All Mail Items From Inbox <Folder>
Returns
List of Outlook Mail Item

Asynchronously retrieves all email items with the specified Event Id from the specified folder. The Event Id is returned from the Async Call Completed event (the event that is returned when there's a result for calling the function). Folder names are case sensitive.
Function Structure
Asynchronously <event id> Get All Mail Items From [<Folder Hierarchy>, …]
Returns
List of Outlook Mail Item

Asynchronously retrieves all email items with the specified Event Id from the specified folder, and according to oldest datetime limit.
Event Id is returned from the Async Call Completed event (the event that is returned when there's a result for calling the function). Folder names are case sensitive.
Function Structure
Asynchronously <event id> Get All Mail Items From [<Folder Hierarchy>, …], search items newer then <Date>
Returns
List of Outlook Mail Item

Asynchronously creates an email message with an attachment, and either displays it to the user for approval or sends it out according to the <Send It> parameter.
Function Structure
Async <event id> create email message <subject> <to> <cc> <bcc> <content> [<attachments>, …] and <send it>
Returns
-

Creates and displays an Outlook Appointment with the specified fields. The appointment is only prepared and displayed, it is not sent or saved automatically.
Parameters
Parameter |
Input Type |
Description |
---|---|---|
subject |
Text |
The subject of the appointment. |
body |
Text |
The body of the appointment. |
start |
DateTime |
The starting date and time of the appointment. |
end |
DateTime |
The ending date and time of the appointment. |
location |
Text |
The location of the appointment. |
Returns
Nothing.
Example
This workflow opens an appointment for a Board Meeting.
The appointment the workflow opens is shown below. Note that the appointment is only prepared and displayed, it is not saved automatically.

Creates and displays an email message, optionally with one or more attachments. The email is only prepared and displayed, it is not sent or saved automatically.
Parameters
Parameter |
Input Type |
Description |
---|---|---|
subject |
Text |
The subject line of the email message. |
to |
Text |
The email addresses to add to the To field of the email. Separate multiple addresses using semi-colons (;). |
cc |
Text |
The email addresses to add to the CC field of the email. Separate multiple addresses using semi-colons (;). |
bcc |
Text |
The email addresses to add to the BCC field of the email. Separate multiple addresses using semi-colons (;). |
body |
Text |
The email body. |
attachments |
List of Text |
The list of full paths to each of the files to attach to the email. |
Returns
Nothing.
Example
This workflow creates an email. Note that two files will be attached to the email.
The email is prepared and displayed. It is not sent automatically.

Creates and displays an email message, optionally with one or more attachments. The email can be sent automatically.
Parameters
Parameter |
Input Type |
Description |
---|---|---|
subject |
Text |
The subject line of the email message. |
to |
Text |
The email addresses to add to the To field of the email. Separate multiple addresses using semi-colons (;). |
cc |
Text |
The email addresses to add to the CC field of the email. Separate multiple addresses using semi-colons (;). |
bcc |
Text |
The email addresses to add to the BCC field of the email. Separate multiple addresses using semi-colons (;). |
body |
Text |
The email body. |
attachments |
List of Text |
The list of full paths to each of the files to attach to the email. |
send | Boolean | Set to True to send the email automatically, or False to only prepare and display it. |
Returns
Nothing.
Example
This workflow creates an email. Note that two files will be attached to the email. Send is set to True, so the email will be sent automatically.
The email is prepared and sent immediately.

Creates and displays an Outlook task with the specified subject and body text, starting at the specified date for the specified duration (in days). The task is only prepared and displayed, it is not saved automatically.
Parameters
Parameter |
Input Type |
Description |
---|---|---|
subject |
Text |
The task subject. |
task |
Text |
The text to enter in the body of the task. |
date |
DateTime |
The start date and time of the task. |
duration |
Number |
The duration of the task in days. |
Returns
Nothing.
Example
This workflow creates a task that will start on December 16 and last for 2 days.
The task is prepared and displayed.

Retrieves the Outlook Mail Item object from the active email.
Function Structure
Get Active Outlook Mail Item
Returns
Outlook Mail Item

Retrieves all the unread email items from a specified folder hierarchy.
Root of the hierarchy is the email ID. For example, to retrieve all the unread emails from the inbox, and the email ID is john.doe@nice.com, specify the folder hierarchy as: John.doe@nice.com Inbox
Function Structure
Get All Unread Mail Items From <Folder Hierarchy>
Returns
List of Outlook Mail Item

Retrieves the newest email item from the Inbox or from a direct sub-folder of the Inbox, that matches the subject and date parameters set. To retrieve an email from a folder not directly under the Inbox, use Get Outlook Mail Item From Specified Folder.
Parameters
Parameter |
Input Type |
Description |
---|---|---|
folder |
Text |
The name of the Inbox sub-folder to retrieve mail from. You can only specify the name of a folder that is directly under the Inbox folder, you cannot specify a folder deeper in the hierarchy. Using the example below, you can only specify the folder _Work, you cannot specify ProjectA, Old Mail, or ProjectB.
To specify the Inbox itself, use Empty Text. Folder names are case sensitive. |
subject |
Text |
The subject of the email to find. |
date |
DateTime |
The date and time of the email item, within a window of 3 minutes. |
Returns
Returns an Outlook Mail Item.
Example
This example uses the mail structure below.
The workflow below retrieves the newest email from the sub-folder _Work that has the subject test a, and was received near 22/11/2020 13:05. The email is stored in the variable Outlook_Mail_Item, which is of type Outlook Mail Item.
The variable is populated with information about the email found.
The workflow below retrieves an email from the Inbox itself. The folder name is empty.

Retrieves the newest email item from the specified folder that matches the subject and date parameters set. Any folder in the hierarchy can be specified.
Parameters
Parameter |
Input Type |
Description |
---|---|---|
folder path |
List of Text |
The path to the folder to retrieve mail from. Using the example below, to search within the ProjectA folder, the path would be ML@nice.com/Inbox/_Work/ProjectA.
Use a Temporary List to specify the path, or populate a List of Text. See the example below. Folder names are case sensitive. |
subject |
Text |
The subject of the email to find. |
date |
DateTime |
The date and time of the email item, within a window of 3 minutes. |
Returns
Returns an Outlook Mail Item.
Example
This example uses the mail structure below.
The workflow below retrieves the newest email from the sub-folder ProjectA that has the subject test a, and was received near 22/11/2020 13:05. The email is stored in the variable Outlook_Mail_Item, which is of type Outlook Mail Item.
The variable is populated with information about the email found.

Retrieves the newest email item from the specified folder that matches the subject and date parameters set and that is older than the date specified. Any folder in the hierarchy can be specified.
Parameters
Parameter |
Input Type |
Description |
---|---|---|
folder path |
List of Text |
The path to the folder to retrieve mail from. Using the example below, to search within the ProjectA folder, the path would be ML@nice.com/Inbox/_Work/ProjectA.
Use a Temporary List to specify the path, or populate a List of Text. See the example below. Folder names are case sensitive. |
subject |
Text |
The subject of the email. |
date |
DateTime |
The date and time of the email item, within a window of 3 minutes. |
oldest date |
DateTime |
Only emails received after this date and time are retrieved. |
Returns
Returns an Outlook Mail Item.
Example
This example uses the mail structure below.
The workflow below retrieves the newest email from the sub-folder ProjectA that has the subject test a, and was received near 22/11/2020 13:05 and after 22/11/2020 00:00. The email is stored in the variable Outlook_Mail_Item, which is of type Outlook Mail Item.
The variable is populated with information about the email found.

Retrieves an instance of the Outlook Application (if one exists). Use this function to assign a value to a complex variable of type Outlook Application so that its events can be used.
Parameters
Parameter |
Input Type |
Description |
---|---|---|
None |
|
|
Returns
An instance of an Outlook Application as an Outlook Application, if one exists.
Example
This workflow populates the variable Outlook_App which is of type Outlook Application, with details of the Outlook application running on the machine.
Once the workflow has been run and Outlook_App has been populated, the Event Handlers below can monitor the agent's Outlook for new email. The variable's New Mail event is triggered when an email is received. The event handler displays a callout when triggered.

Retrieves all mail items from the Inbox or from a direct sub-folder of the Inbox. To retrieve mail items from a folder that is not directly under the Inbox, use Get Outlook Mail Items from Specified Folder.
Parameters
Parameter |
Input Type |
Description |
---|---|---|
folder |
Text |
The name of the Inbox sub-folder to retrieve mail from. You can only specify the name of a folder that is directly under the Inbox folder, you cannot specify a folder deeper in the hierarchy. Using the example below, you can only specify the folder _Work, you cannot specify ProjectA, Old Mail, or ProjectB.
To specify the Inbox itself, use Empty Text. Folder names are case sensitive. |
Returns
Returns the email items as a list of type Outlook Mail Item.
Example
This example uses the mail structure below.
The workflow below retrieves all mail items from the sub-folder _Work. The emails are stored in the variable List_of_Outlook_Mail_Items.
The list is populated with information about all emails found in that folder. Only two email items were found.
The workflow below retrieves emails from the Inbox itself. The folder name is empty.

Retrieves all email items from the specified folder. Any folder in the hierarchy can be specified.
Parameters
Parameter |
Input Type |
Description |
---|---|---|
folder path |
List of Text |
The path to the folder to retrieve mail from. Using the example below, to search within the ProjectA folder, the path would be ML@nice.com/Inbox/_Work/ProjectA.
Use a Temporary List to specify the path, or populate a List of Text. See the example below. Folder names are case sensitive. |
Returns
Returns the email items as a list of type Outlook Mail Item.
Example
This example uses the mail structure below.
The workflow below retrieves all mail from the sub-folder ProjectA. The emails are stored in the variable List_of_Outlook_Mail_Items.
The list is populated with information about all emails found in that folder. Only two mail items were found.

Retrieves all email items from the specified folder that are newer than a specified date. Any folder in the hierarchy can be specified.
Parameters
Parameter |
Input Type |
Description |
---|---|---|
folder path |
List of Text |
The path to the folder to retrieve mail from. Using the example below, to search within the ProjectA folder, the path would be ML@nice.com/Inbox/_Work/ProjectA.
Use a Temporary List to specify the path, or populate a List of Text. See the example below. Folder names are case sensitive. |
date | Date/Time | The oldest date of email items to retrieve. |
Returns
Returns the email items as a list of type Outlook Mail Item.
Example
This example uses the mail structure below.
The workflow below retrieves all mail from the sub-folder ProjectA that are newer than 28/09/2020 00:00. The emails are stored in the variable List_of_Outlook_Mail_Items.
The list is populated with information about all emails found in that folder. Only two mail items were found.

Retrieves the list of Outlook appointments within a specified date range, and with a specified subject.
Parameters
Parameter |
Input Type |
Description |
---|---|---|
start |
DateTime |
The start date and time. |
end |
DateTime |
The end date and time. |
subject |
Text |
Subject of the appointment. |
Returns
Returns a list of appointments that match the specified criteria as a list of type Outlook Item.
Example
This workflow retrieves all appointments scheduled between 0/11/2020 and 31/12/2020 that have the subject Board Meeting. The meetings are stored in the variable List_of_Outlook_Items.
The variable List_of_Outlook_Items is populated with the single appointment found to match the search criteria.

Retrieves the email address from the email server for a specified contact name.
Parameters
Parameter |
Input Type |
Description |
---|---|---|
name |
Text |
The contact name. |
Returns
Returns the email address as text.
Example
This workflow retrieves the email address for a specified contact. The email address retrieved is stored in the text variable textVar.
The email address is retrieved and stored in textVar.

Retrieves a list all Outlook folders in the mailbox.
Parameters
Parameter |
Input Type |
Description |
---|---|---|
none |
|
|
Returns
Returns the Outlook folders as a list of text. The list does not reflect folder hierarchy, and is not sorted.
Example
This example uses the mail structure below. (Only an extract of the full structure is shown.)
The workflow below retrieves the list of folders and stores the list in the variable List_of_Text.
The variable is populated with the list of folders. (Only an extract of the full list is shown.)

Retrieves Outlook task items with a specified subject, that are within the specified start and end dates.
Parameters
Parameter |
Input Type |
Description |
---|---|---|
subject |
Text |
The subject of the Outlook tasks to be retrieved. |
start |
DateTime |
The start date and time. |
end |
DateTime |
The end date and time. |
Returns
Returns the Outlook tasks in a list of type Outlook Item.
Example
This workflow retrieves all tasks with the subject Prepare End of Year Results between 1 November and 30 December. The tasks are stored in the variable List_of_Outlook_Items.
The list List_of_Outlook_Items is populated with the single task that was found.